using RawRestructure.Enums;

namespace RawRestructure.Models;

/// <summary>
/// 存储imageinfo.ini配置文件的数据结构
/// </summary>
public class ImageConfig
{
    /// <summary>
    /// 曝光模式
    /// </summary>
    public int ExpMode { get; set; } = 0;

    /// <summary>
    /// 图像宽度
    /// </summary>
    public int Width { get; set; } = 0;

    /// <summary>
    /// 图像高度
    /// </summary>
    public int Height { get; set; } = 0;

    /// <summary>
    /// 帧率
    /// </summary>
    public int Fps { get; set; } = 0;

    /// <summary>
    /// 千伏
    /// </summary>
    public int KV { get; set; } = 0;

    /// <summary>
    /// 毫安
    /// </summary>
    public int Ma { get; set; } = 0;

    /// <summary>
    /// 毫秒
    /// </summary>
    public int Ms { get; set; } = 0;

    /// <summary>
    /// 毫安秒
    /// </summary>
    public int Mas { get; set; } = 0;

    /// <summary>
    /// 获取曝光模式枚举值
    /// </summary>
    /// <returns>ExpMode枚举值</returns>
    public ExpMode GetExpMode()
    {
        return (ExpMode)ExpMode;
    }

    /// <summary>
    /// 获取曝光模式的显示名称
    /// </summary>
    /// <returns>模式名称</returns>
    public string GetExpModeDisplayName()
    {
        return GetExpMode() switch
        {
            Enums.ExpMode.SIGNAL => "SIGNAL",
            Enums.ExpMode.SLOT => "SLOT",
            Enums.ExpMode.ACQUISITION => "ACQUISITION",
            Enums.ExpMode.FLUORO => "FLUORO",
            Enums.ExpMode.TOMO => "TOMO",
            _ => "未知模式"
        };
    }
} 